<!DOCTYPE HTML>
<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<html>
<head>
	<title>springboot-jspweb|登录页</title>
    <script type="text/javascript" src="/js/jquery.min.js" ></script>
</head>
 <body>
	<form  action="/userLogin" id="loginForm" method="post">
        用户名：<input type="text" name="userName" id="userName"/><br>
        密  码：<input type="password" name="password" id="password"/><br>
        <sapn class="btn-submit"> 登录</sapn><br>
    </form >
 </body>

<script type="text/javascript" >
    $(function () {
        $(".btn-submit").on("click",function () {
            alert("click");
            $("#loginForm").submit();
            //$.post("/userLogin",{userName:$("#userName").val(),password:$("#password")});
        });
    });
</script>
</html>